import 'package:flutter/services.dart';

class XydMethodChannel {
  static const platform = MethodChannel('massage_channel');

  ///埋点
  static Future buryingPoint(Map<String, dynamic> params) async {
    return await platform.invokeMethod('buryingPoint', params);
  }

  ///获取TokenData唯一ID
  static Future<String> getTdid() async => await platform.invokeMethod('tdid');

  ///初始化TdSDK
  static Future initTdSdk() async => await platform.invokeMethod('initTDSDK');

  ///原生调用Flutter
  static void nativeCallFlutter(Future<dynamic> Function(MethodCall call)? handler) {
    platform.setMethodCallHandler(handler);
  }
}
